﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>OneLotus-登录</title>
    <link rel="stylesheet" type="text/css" href="/MobWeb/css/login.css">
    <link href="/MobWeb/js/layer/need/layer.css" rel="stylesheet" />
    <script src="/MobWeb/js/layer/layer.m.js"></script>
    <script src="/MobWeb/js/jquery-1.11.2.min.js"></script>
    <script src="/MobWeb/js/avalon1.47.js"></script>
    <script src="/ViewV5/JS/SZHLCommon.js"></script>


</head>
<body style="display: table; width: 100%; background-size: 100%;  background-color: #ffffff;background-repeat: no-repeat;background-image: url('/MobWeb/Images/BG.png')" ms-controller="Login">
    <div class="form-box" style="margin-top: 60px; display: block; vertical-align: unset;">

        <div style="width: 100%; text-align: center">
            <img src="/MobWeb/Images/SLLOG.png" alt="Alternate Text" style="width: 110px; height: 110px" />
        </div>


        <div class="logo-teacher tc" style="font-size: 22px; color: #ffffff">
            OneLotus-协同办公
        </div>
        <!--   <div class="logo-teacher tc" style="font-size: 16px; color: #ffffff">

        </div>-->
        <div class="input-panel" style="margin-top: 120px; border: 1px solid #eae0e0; margin-bottom: 0; border-top-right-radius: 6px; border-top-left-radius: 6px;">
            <input type="text" placeholder="请输入用户名" ms-duplex="username" id="sfzhm">
        </div>
        <div class="input-panel" style="border-bottom-right-radius: 6px; border: 1px solid #eae0e0; border-bottom-left-radius: 6px; border-top: 0px">
            <input type="password" placeholder="请输入密码" ms-duplex="Pasword" id="xm">
        </div>
        <div style="padding-top:10px">
            <label>
                <input type="checkbox" id="jzmm" checked="checked">
                <span>记住密码</span>
            </label>
        </div>
        <!-- <div class="input-panel" style="padding-bottom: 6px; padding-top: 2px">
            <input type="text" placeholder="输入验证码" ms-duplex="yzm" style="width: 70%">
            <img src="../../ToolS/YZMCode.aspx" alt="Alternate Text" style="width: 28%" onclick="changecode(this)" />
        </div>-->
        <div class="input-panel-btn">
            <button ms-click="LoginUser(this)" style="border-radius: 6px;">
                登录
            </button>
            <div class="login-zc"></div>
        </div>

        <div style="font-size: 14px; text-align: center; width: 100%; margin-top: 60px">
            版权信息：企捷科技
        </div>
    </div>
    <script>
        var model = avalon.define({
            $id: "Login",
            username: "YYZY0139",
            Pasword: "",
            LoginUser: function (dom) {

                var msg = "";
                //$(dom).text("正在登录");
                //$(dom).prop("disabled", true);
                if ($.trim(model.username) == "") {
                    //$(dom).text("登录");
                    //$(dom).prop("disabled", false);
                    msg = "请输入用户名";
                    alert(msg);

                    return;
                }

                if ($.trim(model.Pasword) == "") {
                    //$(dom).text("登录");
                    //$(dom).prop("disabled", false);
                    msg = "请输入密码";

                    alert(msg);
                    return;
                }
                var ComID = "10314";
                $.getJSON('/API/WXAPI.ashx?Action=LOGIN', { "chkcode": "APP", "password": model.Pasword, "UserName": model.username, "ComID": ComID }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        ComFunJS.setCookie('szhlcode', resultData.Result);
                        ComFunJS.setCookie('username', resultData.Result1, 20000);
                        if ($("#jzmm").prop("checked")) {
                            ComFunJS.setCookie('password', $("#password").val(), 20000);
                        } else {
                            ComFunJS.setCookie('password', "", 20000);
                        }
                        location.href = "UI_Index.html";
                    }
                })

            }
        })
        function setCookie(name, value) {
            var Days = 30;
            var exp = new Date();
            exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
            document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString() + ";path=/";
        }
    </script>
</body>
</html>
